package com.zzyl.nursing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzyl.nursing.vo.TimeCountVo;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;
import java.util.List;
import com.zzyl.nursing.domain.Reservation;
import org.apache.ibatis.annotations.Param;

/**
 * 预约信息Mapper接口
 * 
 * @author wms
 * @date 2025-10-03
 */
@Mapper
public interface ReservationMapper extends BaseMapper<Reservation>
{
    void addReservation(Reservation reservation);

    /**
     * 统计指定时间范围内的预约数量
     * @param startTime 开始时间
     * @param endTime 结束时间
     * @return 预约数量列表
     */
    List<TimeCountVo> countReservationsForTime(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);
}
